{include file="public/header" /}
</head>
<body>
<div class="wrap js-check-wrap">
    <form class="form-horizontal js-ajax-form" method="post" action="{:url('Finance/userWallet')}">
        <div class="well form-inline margin-top-20">
            用户名:
            <input type="text" class="form-control" name="userName" style="width: 200px;"
                   value="{$params['userName']|default=''}" placeholder="请输入手机号或者邮箱">　
            <input type="submit" class="btn btn-primary" value="搜索"/>　
            <a class="btn btn-danger" href="{:url('Finance/userWallet')}">清空</a>
        </div>

        <table class="table table-hover table-bordered table-list">
            <thead>
            <tr>
                <th>ID</th>
                <th>所属用户</th>
                <th>可提现金额</th>
                <th>剩余金额</th>
                <th>冻结金额</th>
                <th>修改时间</th>
                <th>创建时间</th>
                <th>操作</th>
            </tr>
            </thead>
            {foreach name="list" item="vo"}
            <tr>
                <td>{$vo.walletId }</td>
                <td>{$vo.userName}</td>
                <td>{$vo.availableBalance}</td>
                <td>{$vo.balance}</td>
                <td>{$vo.freezeBalance}</td>
                <td>{$vo.modifyTime}</td>
                <td>{$vo.createTime}</td>
                <td>
                    <a href="javascript:void(0)" class="js-account-record" data-id="{$vo.userId}">金流记录</a>　
                    <a href="javascript:void(0)" class="js-freeze-record" data-id="{$vo.walletId}">冻结记录</a>　
                </td>
            </tr>
            {/foreach}
        </table>
        {:$pagination}
    </form>
</div>
<script src="{$static}js/layer/layer.js"></script>
<script src="{$static}js/admin.js"></script>
<script type="text/javascript">
    $('.js-account-record').click(function () {
        var id = $(this).data('id');
        alertIframe("{:url('finance/accountRecord')}"+'?id='+id);
    });

    $('.js-freeze-record').click(function () {
        var id = $(this).data('id');
        alertIframe("{:url('finance/freezeRecord')}"+'?id='+id);
    });

    function alertIframe(url) {
        layer.open({
            type: 2,
            title: false,
            area: ['80%', '80%'],
            shade: 0.2,
            closeBtn: 1,
            shadeClose: true,
            content: url
        });
    }
</script>
</body>
</html>